﻿<%IF not(Session("logKEY")="_root"  or Session("logKEY")="_administrator" ) THEN
response.redirect "noAcRight.asp"
response.end
END IF
%>
<!--#include file=../../include/config.asp -->
<!--#include file=../../include/conn3.asp -->
<!--#include file=../../include/md5.asp -->
<%
'无高级管理员权限者无法访问此页【未写】




'用户类型数组
set rs=server.CreateObject("ADODB.RecordSet") 
rs.Source="select typeID,typename2 from usertype order by typeID asc "
rs.Open rs.Source,conn,1,1
count=rs.RecordCount
dim ArrayUsertype(50)
for i=0 to count
ArrayUsertype(i)=rs("typename2")
rs.movenext
next
rs.close
set rs=nothing
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%=Sitename%></title>
<link href="../../style/base.css" rel="stylesheet" type="text/css" />
<link href="../../style/admin.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div>管理员列表</div>
	<table>
		<tr>
			<th>用户名</th>
			<th>加密密码</th>
			<th>用户类型</th>
			<th>修改</th>
			<th>删除</th>
		</tr>
<%
set rs=server.CreateObject("ADODB.RecordSet")
rs.open "select * from admin where isAval=true and usertypeID<>0",conn,1,1
if rs.eof then
%>
<tr>
<td col="5">没有用户 :(</td>
</tr>
<%else
do while NOT rs.eof
%>
		<tr>
			<td><%=rs("username")%></td>
			<td><%=rs("password")%></td>
			<td><%=ArrayUsertype(trim(rs("usertypeID")))%></td>
			<td><a href="usermodpwd.asp?id=<%=rs("ID")%>">修改</a></td>
			<td><a href="userdel.asp?id=<%=rs("ID")%>" onClick="return window.confirm('确实要删除【<%=rs("username") %>】此用户吗？');">删除</a></td>
		</tr>
<%rs.movenext
loop
end if
rs.close
set rs=nothing%>
	</table>
</body>
</html>
<% call CloseConn() %>